<?php
require_once("Beanstalk_API/Beanstalk_API.php");

$domain = "http://yourURL.beanstalkapp.com/";
$username = "";
$password = "";

//# Initialize...
//# Gather account information...
$account = new Beanstalk_API_Account($domain, $username, $password);
$changeset = new Beanstalk_API_Changeset($domain, $username, $password);
$release = new Beanstalk_API_Release($domain, $username, $password);
$release_server = new Beanstalk_API_Release_Server($domain, $username, $password);
$repository = new Beanstalk_API_Repository($domain, $username, $password);
$user = new Beanstalk_API_User($domain, $username, $password);

$account_find = $account->Find();

//# Let's try to change the name of our company.
$items = array(
    "name"=>"Tactics of War Testing",
    "time-zone"=>"Central Time (US & Canada)"
    );
$account_save = $account->Save($items);

?>
<pre>
<?php
echo 'Dump of the initial data from Beanstalk_API_Account->Find<br/><br/>';
var_dump($account_find);
echo '<br/>Our username<br/><br/>';
var_dump($account_find->name);
echo '<br/>Here is what is returned from Beanstalk_API_Account->Save:
    array[0] is the result from the Beanstalk server
    array[1] is the XML that was sent during the PUT request
    (You may have to View Source in order to see the actual XML tags.)<br/><br/>';
var_dump($account_save);
?>
</pre>
